<template>
  <div class = "update">
    <p>{{name1}}--{{name2}}--{{name3}}--{{name4}}</p>
    <p>{{test()}}</p>
  </div>
</template>

<script>
export default {
    name: "UpDate",

    props:["name1" , "name2" , "name3" ,"name4"],

    methods: {
        test(){
            //props接收的属性在_props中
            console.log(this._props);
            //组件实例上也有(属性代理)
            console.log(this);
        }
    },
}
</script>

<style>
.update{
    background-color: hotpink;
    height: 200px;
}
</style>